﻿using System;
namespace nyxwin.Common.Base.Utils
{
    public class DateTimeN
    {
        private readonly long serverTime;

        public DateTimeN(long serverTime)
        {
            this.serverTime = serverTime;
        }

        public static implicit operator System.DateTime(DateTimeN source)
        {
            var dt = new System.DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
            System.DateTime dtresult = dt.AddSeconds(source.serverTime);
            return TimeZoneInfo.ConvertTime(dtresult, TimeZoneInfo.Local);
        }
    }
}